POV-Ray : Newsgroups : povray.advanced-users : Evaluating pattern : Re: Evaluating pattern Server Time
30 Jul 2024 06:18:32 EDT (-0400)
  Re: Evaluating pattern  
From: Chris Colefax
Date: 26 Jan 2000 17:50:33
Message: <388f7a39@news.povray.org>
Gail Shaw <gsh### [at] monotixcoza> wrote:
> I recall that someone (Chris Huff? ) wrote a patch so that the value of a
> pattern could
> be evaluated at a point. Is this available in megapov, if not is there any
> way I could find out the value of a pigment at a certain point in a
pattern?
>
> I have a bozo pattern (pigment) and I want to be able to get 15 random
> pigments that
> the pattern would have produced.

Would translating the pigment by random amounts be enough?  I use this
method in the Galaxy include file to produce differently shaped nebulae,
based on POV-Ray's various noise patterns, eg:

   #declare R1 = seed(0);
   #declare Patterns = array[15]

   #declare C = 0; #while (C < 15)
      #declare Patterns[C] = pigment {bozo
         translate (<rand(R1), rand(R1), rand(R1)>-.5)*1000}
   #declare C = C + 1; #end

Depending on how random you want the patterns you could add random scalings
and rotations as well.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.